package com.besall.allbase.view.activity.chipstoollevel4.protocol.Settings;

import android.os.Bundle;
import android.view.View;
import androidx.appcompat.app.AppCompatActivity;
import bb.lanxing.R;
import bb.lanxing.activity.base.BaseActivity;
import com.besall.allbase.view.activity.chipstoollevel4.protocol.Settings.storagemanager.StorageManagerFragment;

public class StorageManagerActivity extends BaseActivity {
	@Override public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_storage_manager);
		setupActionBar(true);
		getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
		if (savedInstanceState == null) {
			getSupportFragmentManager().beginTransaction().replace(R.id.container, StorageManagerFragment.newInstance()).commitNow();
		}
	}
	@Override
	public void onBackPressed() {
		if (getSupportFragmentManager().getBackStackEntryCount() > 0) {
			// 如果返回栈有 Fragment，则回退上一个 Fragment
			getSupportFragmentManager().popBackStack();
		} else {
			// 否则默认行为（退出 Activity）
			super.onBackPressed();
		}
	}
}